<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body> 
	
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/jquery-1.11.3.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/websocket/sockjs-0.3.4.js"></script>
	<script>
		var websocket;
		if ('WebSocket' in window) {
			websocket = new WebSocket(
					"ws://localhost:10000/ssm-maven-project/websocket");
		} else if ('MozWebSocket' in window) {
			websocket = new MozWebSocket(
					"ws://localhost:10000/ssm-maven-project/websocket");
		} else {
			websocket = new SockJS(
					"http://localhost:10000/ssm-maven-project/websocket/socketjs");
		}
		websocket.onopen = function(evnt) {
		};
		websocket.onmessage = function(evnt) {
			$("#msgcount").html("(<font color='red'>" + evnt.data + "</font>)")
		};
		websocket.onerror = function(evnt) {
		};
		websocket.onclose = function(evnt) {
		}
	</script>
</body>
</html>